package cn.edu.buaa.nlsde.mpj.fw.invoker.loader;

import cn.edu.buaa.nlsde.mpj.fw.model.procedure.Procedure;
import org.dom4j.Element;

public class ProcedureResolver {
    public Procedure resolve(Element element) {
        String name = element.attributeValue("name");
        String expr = element.element("expression").getTextTrim();
        String retName = element.element("return-name").getTextTrim();
        Procedure procedure = new Procedure(name, expr, retName);
        return procedure;
    }
}
